﻿using System.Collections.Generic;
using System.Linq;
using OABackground.Entities;
namespace OABackground.Infrastructure
{
    public class StudentRepository
    {
        public void AddStudent(Student student)
        {
            using (oaContext dbContext = new oaContext())
            {
                dbContext.Student.Add(student);
                dbContext.SaveChanges();
            }
        }
        public void AddTeacher(Teacherinfomation teacherinfomation)
        {
            using(oaContext oaContext = new oaContext())
            {
                oaContext.Teacherinfomation.Add(teacherinfomation);
                oaContext.SaveChanges();
            }
        }
        public void AddTeacherPwd(Teacherpassword teacherinfomation)
        {
            using (oaContext oaContext = new oaContext())
            {
                oaContext.Teacherpassword.Add(teacherinfomation);
                oaContext.SaveChanges();
            }
        }
    }
}
